package com.maegul.web.pages;

import org.apache.wicket.markup.html.form.PasswordTextField;
import org.apache.wicket.markup.html.form.StatelessForm;
import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.markup.html.panel.FeedbackPanel;
import org.apache.wicket.model.CompoundPropertyModel;

import com.maegul.web.pages.base.BasePage;

public class NewUserPage extends BasePage {

	private static final long serialVersionUID = 1L;

	protected NewUserPage() {
		super(NEW_USER_HEADER, NEW_USER_HEADER);
		add(new FeedbackPanel("feedback_signup"));
		add(new SignUpForm("signup_form"));

	}

	private static class SignUpForm extends StatelessForm<SignUpForm> {

		private static final long serialVersionUID = 1L;

		public SignUpForm(String id) {
			super(id);
			
			setModel(new CompoundPropertyModel<NewUserPage.SignUpForm>(this));
			add(new TextField<String>("username"));
			add(new PasswordTextField("password"));
			add(new PasswordTextField("password_check"));
			add(new TextField<String>("full_name"));
			add(new TextField<String>("mail"));
			add(new TextField<String>("mail_check"));
		}

	}

}
